%!TEX TS-program = xetex
%!TEX encoding = UTF-8 Unicode



% 纸张
\pdfpagewidth 210mm
\pdfpageheight 297mm

% 版面
\hsize = 156mm% 156+
\vsize = 225mm

% TeX 默认版芯偏移（1英寸+hoffset）
\voffset=11.6mm
\hoffset=1.6mm



% 字体组一、Windows 自带字体
\font\heitiA="SimHei" at 16pt
\font\fangsongA="FangSong" at 16pt
\font\kaitiA="KaiTi" at 16pt
\font\songtititleA="Source Han Serif SC Bold:color=FF0000" at 36pt
\font\songtifootA="SimSun" at 14pt

% 字体组二、方正免费字体
\font\heitiB="方正黑体简体" at 16pt
\font\fangsongB="方正仿宋简体" at 16pt
\font\kaitiB="方正楷体简体" at 16pt
\font\songtititleB="方正小标宋简体:color=FF0000" at 36pt
\font\songtifootB="SimSun" at 14pt

% 字体组三、思源字体
\font\heitiC="SimHei" at 16pt
\font\fangsongC="FangSong" at 16pt
\font\kaitiC="KaiTi" at 16pt
\font\songtititleC="Source Han Serif SC Bold:color=FF0000" at 36pt
\font\songtifootC="SimSun" at 14pt



\def\heiti{\heitiB}
\def\fangsong{\fangsongB}
\def\kaiti{\kaitiB}
\def\songtititle{\songtititleB}
\def\songtifoot{\songtifootB}


% 字体
% 份号 密级 紧急程度
\font\heiti="SimHei" at 16pt
\font\songti="[SimSun]:color=0000FF" at 9pt
\font\fangsong="FangSong" at 16pt
\font\kaiti="KaiTi" at 16pt

\songti% 调试信息字体
\XeTeXlinebreaklocale "zh"
\XeTeXinputencoding=utf-8
\XeTeXlinebreakskip = 0pt plus 1pt minus 0.1pt

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 奇偶页码 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\footline = {\vbox{%
\vskip 7mm%  横线中心距离文档 7 毫米
\vskip -6pt% 横线字高的一半
\songtifoot%
\noindent%
\kern 16pt%  对应正文三号 16pt
\ifodd\pageno\hfill\else\fi%
-\kern -1pt-\kern 7pt\folio\kern 7pt-\kern -1pt-%
\kern 16pt%
}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 密级期限 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\vbox to 35mm{
\heiti
\parindent = 0pt
\baselineskip = 11.66mm
\setbox37 = \hbox{密级★期限}
000001\par
\box37\par
紧\hskip 5.33pt急\hskip 5.33pt程\hskip 5.33pt度\par
\vfill
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 发文机关 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
{
% 发文机关标识推荐使用小标宋体字
% 字号由发文机关以醒目美观为原则酌定，但是最大不能等于或大于22mm×15mm。
\parindent=0pt
\songtititle
\centerline{惠州端口科技有限公司文件}
\vskip 36pt%空一行
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 文件编号 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
{
\parindent=0pt
\fangsong
\centerline{端软发〔2024〕1号}
}
% 间隔 4mm
{
\special{color push rgb 1 0 0}%
\vskip 4mm
\hrule height 3pt
\special{color pop}
}
% 标题：2号宋体，编排于红色分隔线下空两行（行间距28磅）
% 位置，分一行或多行居中排布；回行时，标题排列应当使用
% 梯形或菱形。
\vskip 28pt
\vskip 28pt
\vbox{
% \font\songti = "Source Han Serif SC Bold" at 22pt%
\font\songti = "方正小标宋简体" at 22pt%
\baselineskip = 28pt
\parskip = 0pt
\songti
\centerline{端口科技软件部}%
\centerline{关于任命\thinspace 烤鸭大哥\thinspace 为一号码农的通知}%
\vskip 28pt
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 接收机关 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
{%编排于标题下空一行位置，居左顶格，机关名称后标全角冒号
\fangsong
\noindent 各位\TeX{}专家、朋友以及用户：
}

{
\fangsong
\baselineskip = 28pt
\setbox37 = \hbox{缩进}
\parindent = \wd37
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 正文开始 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
关于公司文件按照《党政机关公文格式国家标准》（GB/T9704-2012）格式撰写的通知\par
根据上述标准，配合做好以下重点事项：\par

{\heiti 一、一级条目}\par
{\kaiti （一）二级条目}\par
条目内容\par

{\heiti 二、存在问题}\par
{\kaiti （一）版记}\par
正文结束位于奇数页时需要换页，把版记放到偶数页。现在版记不能总是定位到正确位置，遇到请手工调整。\par
{\kaiti （二）落款}\par
印章距正文大于1毫米且在一行之内。\par

{\kaiti （三）字体大小不精确}\par
规范中要求字体大小为三号字体，三号对应15.75pt。
目前用的是16pt，按每行28字计，一行误差大约为7pt，目前实测相差5pt。
这种情况会导致一行只能放置27个汉字。可以将版芯增加5pt，即448pt，规范要求是156mm，
即（\setbox37=\hbox to 156mm{}\the\wd37）。

目前版芯宽：\the\hsize，
\setbox37 = \hbox{一二三四五六七一二三四五六七一二三四五六七一二三四五六七}
28个字的实际宽度：\the\wd37。\par
\noindent{}\box37{}\par
\noindent{}一二三四五六七一二三四五六七一二三四五六七一二三四五六七超\par
请做细微调节，使下面的七言绝句（每行28字）对齐。\par
\noindent%
浔阳江头夜送客枫叶荻花秋瑟瑟主人下马客在船举酒欲饮无管弦醉不成欢惨将别别时茫茫江%
浸月忽闻水上琵琶声主人忘归客不发寻声暗问弹者谁琵琶声停欲语迟移船相近邀相见添酒回%
灯重开宴千呼万唤始出来犹抱琵琶半遮面转轴拨弦三两声未成曲调先有情弦弦掩抑声声思似%
诉平生不得志低眉信手续续弹说尽心中无限事轻拢慢捻抹复挑初为霓裳后六幺大弦嘈嘈如急%
雨小弦切切如私语嘈嘈切切错杂弹大珠小珠落玉盘间关莺语花底滑幽咽泉流冰下难冰泉冷涩%
弦凝绝凝绝不通声暂歇别有幽愁暗恨生此时无声胜有声银瓶乍破水浆迸铁骑突出刀枪鸣曲终%
收拨当心画四弦一声如裂帛东船西舫悄无言唯见江心秋月白沉吟放拨插弦中整顿衣裳起敛容%
自言本是京城女家在虾蟆陵下住十三学得琵琶成名属教坊第一部曲罢曾教善才服妆成每被秋%
娘妒五陵年少争缠头一曲红绡不知数钿头银篦击节碎血色罗裙翻酒污今年欢笑复明年秋月春%
风等闲度弟走从军阿姨死暮去朝来颜色故门前冷落鞍马稀老大嫁作商人妇商人重利轻别离前%
月浮梁买茶去去来江口守空船绕船月明江水寒夜深忽梦少年事梦啼妆泪红阑干我闻琵琶已叹%
息又闻此语重唧唧同是天涯沦落人相逢何必曾相识我从去年辞帝京谪居卧病浔阳城浔阳地僻%
无音乐终岁不闻丝竹声住近湓江地低湿黄芦苦竹绕宅生其间旦暮闻何物杜鹃啼血猿哀鸣春江%
花朝秋月夜往往取酒还独倾岂无山歌与村笛呕哑嘲哳难为听今夜闻君琵琶语如听仙乐耳暂明%
莫辞更坐弹一曲为君翻作琵琶行感我此言良久立却坐促弦弦转急凄凄不似向前声满座重闻皆%
掩泣座中泣下谁最多江州司马青衫湿

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 正文结束 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
}

\hfill\vbox to 21mm{%
\special{color push rgb 0 0 0}%
\hsize = 40mm
\hrule
\vskip 1mm
%\hrule
%\vbox to 0pt{\vskip 4pt 印章距正文 大于1毫米 且在一行之内}
\vskip 28pt
%\hrule
\special{color pop}
}\kern 38mm

\fangsong
\baselineskip = 28pt
\setbox37=\hbox{右空四字}
\setbox38=\hbox{后勤部办公室}
\setbox39=\hbox{2023年12月8日}
\setbox40=\hbox to \wd37{\hfill}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 智障换页 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 正文结束位于奇数页时需要换页，把版记放到偶数页。
\hfill\vbox{%
\hsize=\wd38
% \hsize=\wd39
\centerline{\box38}
\centerline{\box39}
}\kern \wd37

\ifodd\pageno{\vfill\hfill\vfill\vskip\vsize}%
\else{\vfill\hfill}\fi%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 偶页版记 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 版记排在偶数页
\vbox{
\font\fangsong="FangSong" at 14pt
\baselineskip = 24pt
\parindent = 0pt
\fangsong

\setbox37=\hbox{隔}
\setbox38=\vbox{\hsize = 390pt 总公司硬件部、软件部、滑稽部、后勤部，工厂食堂、测试线、生产线、保洁部。}
\setbox39=\vbox{\hbox{\quad 抄送：}}{\ht39=\ht38 \dp39=\dp38 }

\hrule height 1pt
\vskip 5pt
\hbox{\box39\box38}
\vskip 5pt
\hrule height 1pt
\vskip 5pt
\vbox{{\quad 惠州端口科技有限公司后勤部办公室}\hfill{2023年12月8日印发}\kern \wd37}\par
\vskip 5pt
\hrule height 1pt
}
% 参考资料
% https://www.uta.edu.cn/xsc/2022/0716/c2066a116074/page.htm
\bye
